<template>
  <div>
    <h3 ref="myH3">特长</h3>
    <p ref="p">小明同学</p>
    <button @click="abdnp">按钮</button>
    <my-jack ref="jack"></my-jack>
    <button @click="getJack">按钮</button>
  </div>
</template>
<script>

import MyJack from './components/jack.vue'

export default {
  methods: {
    abdnp () {
   
      this.$refs.myH3.style.backgroundColor = 'pink'
      this.$refs.p.style.color = 'red'
    },

    getJack () {
      console.log(this.$refs.jack)
      this.$refs.jack.dance()
      this.$refs.jack.sing()
  }
  },
  components: {
    MyJack
  }
}
</script>

<style>

</style>